Monitor and log working

TODO: path to log file needs to be added in db