Improved debug

are you sure we need additional file for just one function?