add format sanity check