exist check must be before file date check

Signed-off-by: Jan Linhart <jan.linhart@easysoftware.cz>