first ensure all files are ready