Make writeFile function always return file object. This is done because in many cases, write operation might add some valuable data to object that is useful for client application.