ensure dir for timestamp logs exist
made debuging more convenient by using a variable
ensuring there is a default value