Boostrap: Log startup exception to console if needed and to file as error

Closes #6581