fixed path to facktory.sh, fixed build dependency, added check if generation of factoty is OK