added --allow-dirty option