added after_failure commands. use sed to replace RAILS_SECRET_TOKEN