Create logging functionality, will update more tomorrow