removed minimize() and included a while loop, which is much more efficient for this case
improved log message
FIXED imperfection files
FIXED imperfection files