Adds functions to display log and errors

To make it easier to display logs and errors I've created to functions and a command line argument.
Also, I've converted every concatenations of strings to use the `format` function in order to have a cleaner code.