added file seek and debug bytes