Fix add_file error handling

Those yara calls are tricky.