Added open basedir checks, added better info about image failures