implements single process_file() wrapper function.