Only adding relevant messages to log file