Fix wrong console logging format assignment. Refs #5609.

Added some extra logging and error reporting in case of troubles.