add printStackTrace for debugging