using path module for proper path resolution