fixed db path validity checker