fixed filepath generating