renamed img folder to resources; better error message