pass null instead of undefined if no error occurs
check if the commands run in order