Adding a check to see if the user has access to log file