Fixed line breaks in error messages.
Added file exist checks to file system functions.
Added serialization class.