Added dryrun and force option. some other minor modifications