[UPDATE] debug option and simplification

Add debug option to display each call to audit() method in order to have
a trace to each call

Simplify file writing by using file_put_contents and a really simple way
to generate the file content