Unneeded write to file removed