making file upload synchronus