fixing view script - now works when there are spaces in file path