Fixing async compilation of files