init script correction related to commands execution and error checking