Yeah but there is still an issue that I couldn't figure out. If there is a syntax problem in one of the JS files, phantom just reports 'Syntax Error' without any indication whatsoever. It seems to be a phantom or JS interpreter issue but I didn't look too much into it.