Fix type on temp file rename