Added error handling for when initctl resart app doesn't work.