Adding changes to query by file handle