Update the command line interface

Added new feature:
 - Can print out error code message
 - It can specify the location of error