catch IOError in the create_datetime_dir
the correct Except should be OSError