fix file check in PUT request