Fixed bug on file path building