Added tons of logging for debug purposes