Revert "Use filepath instead of path where possible"

This reverts commit 49beccf7726887211cfb05a20f6bbc175ec5847e.
- Failed on CI