Add quotes for variable; change shell redirection.