Fixed error when log_level not specified. Fixed error when trying to sort an empty list.