Fix checks for Y
add datestamp to log filename