print error if error while executing command