Try writing instead of renaming for deployment