Fixed LOCAL_DIR_STATE_PATH
Corrected some bug fixes