Support --check and also support writing diffs to file
Merge branch 'check_feature' into dyn