Added simple file writing.