Added file logging to logmsg function