Added print_error function and updated README