FIX: if blocks checking for files