logs folder will be created if it doesn't exist.