cleanup
add and use utils.is_valid_path