Improve safe_print function
Update .gitignore
Update usage docs
Refactor filter code