Add debug statements and ulimit