better log output from uploadFile