Set logging level when simulate mode
Handle malformed images