Added file logging and simple filter mechanism