removed a debug message and change to a better error message when collection is not specified.