fixing autoloader problem and file writer adjustments