Added comments and error message