Changes : added one more case for error handler function, one log file per day - the original log file will start with Y-m-d formated data, by default, the log function is set to print the message