return 1 for error instead of -1; fix file path bugs WEB-7316