fixed last error handling after php process finished
Merge pull request #23 from zelgerj/master

fixed last error handling after php process finished