removed logging for production mode and fixed small bugs