Bug 2

Fixed minor test mistake. and add error messages in the main file.