def safe_open(path):
    """ If the file can be opened, returns a file handle; otherwise None."""

    try:
        return open(path, 'rb')
    except (IOError, PermissionError, FileNotFoundError):
        return None