Changed exec to spawn, to follow better any issues
Remove rmdir function after error on build