Resolving forgotten (probably) error
Agent upload handler now deletes the tmp file
Some fine-tuning & improvements