fixes #1 but returns a strange file path