Fix method name for directory check