added checkattributes
moved writersettings setup
and more checks