Updated to return an error if automake fails