* add only rule file path in --rules * add error handling for metadata * refactor * add test * rename test function