Added basic logging. Going to improve