Fixed nit variable name and safe cp no /dev/null