proper path resolving for file