change db input to file input; fix appEntry bug