Added /env for debug
Implemented db check