updating database.yml and error logic in the rake task