fixed check for logs directory
inital version