Made the logging options more flexible