clearer logging and error feedback, and minor fixes