Added cosnole logging, some arg parsing