Added error handling on strftime.