added basic error handling to config
implemented archiving and file copying