Improve journaling for debugging

now supports the command > make test < for automated compiling and testing