File-system error prevention

For opening file-location:

Added regex
Added shortcut checking