Added function print_error for autoformated printing
Added basic logging functionality