move logger configuration to the beginning of file, add information to exception during logging