fix error handling:
* doesn't crash on false format
* doesn't crash on non existing dependency