uploadfile improvements