Removed write to file function.