fix8: attempt to make upload_file function not deadlockable