Ensuring temp file is on the same device while saving