Back-end minor cleanups

- rm of file in uploads/ after print command sent
- add rand() to filename to avoid conflicts in case of same file upload
at same time