Unable to write the file