logger and refactor constants