Fixed bug where only filename was used rather than full path