Log file implemented, also found bug in solver logic.