Added more checks, if commands got executed successfully or not