Added utility methods to check if the file exists and to delete files and directories