Some error checking and not relying on rails root
Adding back in command line... command