more console stuff like logging and throwing and exception when it fails