Functions to debug application