make thumbnail and screenshot, also cleans up files after upload