Added some useful functions for logging