Removed unnecessary check when writing to file