added file_exists() check before is_readable() check