Check for file existence before trying to alter it