Added try and catch for $engine->chmod command