rubocop added
simplified error logging
refactor delivery handler
cleanup logger
improved logging and testing of logger