filePath.toUri() in the else block will make it absolute