resolve base path