files upload, cleanup