Fixed errors in case only invalid files have been uploaded.