fixed to create logs directory if it does not exist