Added optional reason and logging to the exception
Refactor of the tracelog to remove conditional during logging