fix for handle_file