Improved LogHandler constructor, code readability, and added level check