red prompt if last exit code was not zero. conditional overwrite of open command