Fixed from_dict to optionally accept an integer for a datetime
Better error logging