simplified and fixed regex for file path