Refactoring (logger.info's nullpoint exception, 404 error etc)