Error Message handling

Error meassage handling is added