<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_from_file(filename):
 """ Load a list of filenames from an external text file. """

    if os.path.isdir(filename):
        logger.error("Err: File '%s' is a directory", filename)
        return None
    if not os.path.isfile(filename):
        logger.error("Err: File '%s' does not exist", filename)
        return None

    try:
        with open(filename, 'r') as sourcefile:
            songs = [line.strip() for line in sourcefile]
    except IOError as error:
        logger.exception(error)
        return None
    songs = set(Song.from_filename(song) for song in songs)
    return songs.difference({None})