Fix async handling of multiple files