Added better debugging