Bug Fix: Correctly determine the file path