Added path checking, some db functions using storm