revise some error messages. cleanup and return null in those 'not good' cases